package com.molyfun.parents.rest.bean;

import com.molyfun.parents.rest.BaseResponse;

import java.util.HashMap;
import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * Date:10/31/16.
 */
public class DateHasDataResponse extends BaseResponse {

    private List<DateDataBean> data;

    public List<DateDataBean> getData(){
        return data;
    }

    public HashMap<String,Boolean> getHashMap(){
        HashMap<String,Boolean> dayDataMap = new HashMap<>();
        if(data != null && data.size() > 0){
            for(DateDataBean dateDataBean : data){
                dayDataMap.put(dateDataBean.getDatestr(), dateDataBean.isIsexist());
            }
        }
        return dayDataMap;
    }


    public static class DateDataBean {

        /**
         * datestr : 2017-01-31
         * isexist : false
         */

        private String datestr;
        private boolean isexist;

        public String getDatestr() {
            return datestr;
        }

        public void setDatestr(String datestr) {
            this.datestr = datestr;
        }

        public boolean isIsexist() {
            return isexist;
        }

        public void setIsexist(boolean isexist) {
            this.isexist = isexist;
        }
    }

}
